import { RouteRecordRaw } from 'vue-router'

const routes:RouteRecordRaw[]=[
    {
        path:'/',
        component:()=>import ('../layout/AppLayout.vue'),
        redirect:'/website',
        children:[{
            path:'/home',
            name:'home',
            meta: { title: '首页' },
            component:()=>import ('../view/home/index.vue')
        },
        {
            path:'/workspace',
            name:'workspace',
            meta: { title: 'workspace' },
            component:()=>import ('../view/workSpace/index.vue')
        },
        {
            path:'/website/',
            name:'websites',
            meta: { title: '资源推荐' },
            component:()=>import ('../view/website/index.vue'),
        },
        {
            path:'/webDetailPage',
            name:'webDetailPage',
            component:()=>import('../view/website/webDetailPage.vue'),
        },
        {
            path:'/userCenter',
            name: 'userCenter',
            meta:{ title:'个人中心' },
            component:()=>import('../view/userCenter/index.vue'),
        }
        ]
    },

    {
        path:'/login',
        meta: { title: '欢迎来到科研导航' },
        component:()=>import('../view/login/index.vue')
    },
]

export default routes